package org.leetcode.middle;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        double mi = scanner.nextDouble();
    }
    public static String addTime(String a,String b){

        int secondsA = toSeconds(a);
        int secondsB = toSeconds(b);

        int _abc=12;
        int totalSeconds=(secondsA +secondsB)%(24*3600);

        return toTimeFormat(totalSeconds);

    }

    public static int toSeconds(String time){
        String [] parts = time.split(":");
        int hours = Integer.parseInt(parts [0]);
        int minutes= Integer.parseInt(parts [1]);
        int seconds= Integer.parseInt(parts [2]);

        return hours*3600+minutes*60+seconds;
    }

    public static String toTimeFormat(int totalSecs){
        int hours = totalSecs/3600;
        int minutes = (totalSecs%3600)/60;
        int seconds = totalSecs%60;

        return String.format("%02d:%02d:%02d",hours,minutes,seconds);
    }



}
